Extending Cache for an External Storage System into Individual Servers

ABSTRACT

Mechanisms are provided for extending cache for an external storage system into individual servers. Certain servers may have cards with cache in the form of dynamic random access memory (DRAM) and non-volatile storage, such as flash memory or solid-state drives (SSDs), which may be viewed as actual extensions of the external storage system. In this way, the storage system is distributed across the storage area network (SAN) into various servers. Several new semantics are used in communication between the cards and the storage system to keep the read caches coherent.

BACKGROUND

The present application relates generally to an improved data processingapparatus and method and more specifically to mechanisms for extendingcache for an external storage system into individual servers.

A storage area network (SAN) is a dedicated storage network thatprovides access to consolidated, block level storage. SANs primarilymake storage devices accessible to servers so that the devices appear aslocally attached to the operating system. A SAN may have its own networkof storage devices that are generally not accessible through the regularnetwork by regular devices.

In a typical configuration, external storage systems connect by a SAN.Inside the storage system is a cache, which typically comprises dynamicrandom access memory (DRAM). The cache reduces latency seen by theserver; however, this cache stores most recently used data by allservers attached to the external storage system. SAN delays and delay inthe storage system due to cache misses affect latency.

SUMMARY

In one illustrative embodiment, a method, in a data processing system,is provided for extending cache for a storage system in a storage areanetwork. The method comprises storing a copy of data in an extendedcache card attached to a server. The extended cache card comprisesanon-volatile memory for storing copies of data read from or written toan external storage system by the server. Responsive to receiving fromthe server a request to read a first portion of data from the externalstorage system, the method comprises determining whether the extendedcache card stores an up-to-date copy of the first portion of data.Responsive to a determination that the extended cache card stores anup-to-date copy of the first portion of data, the method comprisessending the copy of the first portion of data from the extended cachecard to the server.

In other illustrative embodiments, a computer program product comprisinga computer useable or readable medium having a computer readable programis provided. The computer readable program, when executed on a computingdevice, causes the computing device to perform various ones, andcombinations of, the operations outlined above with regard to the methodillustrative embodiment.

In yet another illustrative embodiment, a system/apparatus is provided.The system/apparatus may comprise one or more processors and a memorycoupled to the one or more processors. The memory may compriseinstructions which, when executed by the one or more processors, causethe one or more processors to perform various ones, and combinations of,the operations outlined above with regard to the method illustrativeembodiment.

These and other features and advantages of the present invention will bedescribed in, or will become apparent to those of ordinary skill in theart in view of, the following detailed description of the exampleembodiments of the present invention.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The invention, as well as a preferred mode of use and further objectivesand advantages thereof, will best be understood by reference to thefollowing detailed description of illustrative embodiments when read inconjunction with the accompanying drawings, wherein:

FIG. 1 depicts a pictorial representation of an example distributed dataprocessing system in which aspects of the illustrative embodiments maybe implemented;

FIG. 2 is a block diagram of an example data processing system in whichaspects of the illustrative embodiments may be implemented;

FIG. 3 is a diagram illustrating a storage area network with extendedcache in accordance with an illustrative embodiment;

FIG. 4 is a block diagram illustrating an extended cache card inaccordance with an illustrative embodiment;

FIG. 5 is a flowchart illustrating operation of a server with extendedcache for an external storage system with writethrough in accordancewith an illustrative embodiment;

FIG. 6 is a flowchart illustrating operation of an extended cache cardfor extending cache for an external storage system with writethrough inaccordance with an illustrative embodiment;

FIG. 7 is a flowchart illustrating operation of an extended cache cardfor extending cache for an external storage system with writeback inaccordance with an illustrative embodiment; and

FIG. 8 is a flowchart illustrating operation of a storage system withextended cache card with writeback in accordance with an illustrativeembodiment.

DETAILED DESCRIPTION

The illustrative embodiments provide a mechanism for extending cache foran external storage system into individual servers. Certain servers mayhave cards with cache in the form of dynamic random access memory (DRAM)and non-volatile storage, such as flash memory or solid-state drives(SSDs), which may be viewed as actual extensions of the external storagesystem. In this way, the storage system is distributed across thestorage area network (SAN) into various servers. Several new semanticsare used in communication between the cards and the storage system tokeep the read caches coherent. In one embodiment, writes are done viawritethrough so that the server always has the latest copy of the data.

In an alternative embodiment, the card writes a TOUCH semantic to thestorage server with no data being written, only the logical blockaddresses (LBAs) that are updated. When receiving a TOUCH semantic, theexternal storage system invalidates any copy of the LBAs it has in itscache and sends INVALIDATE semantics to all external cache cards inother servers that may have accessed the LBAs.

The illustrative embodiments may be utilized in many different types ofdata processing environments including a distributed data processingenvironment, a single data processing device, or the like. In order toprovide a context for the description of the specific elements andfunctionality of the illustrative embodiments, FIGS. 1 and 2 areprovided hereafter as example environments in which aspects of theillustrative embodiments may be implemented. It should be appreciatedthat FIGS. 1 and 2 are only examples and are not intended to assert orimply any limitation with regard to the environments in which aspects orembodiments of the present invention may be implemented. Manymodifications to the depicted environments may be made without departingfrom the spirit and scope of the present invention.

FIG. 1 depicts a pictorial representation of an example distributed dataprocessing system in which aspects of the illustrative embodiments maybe implemented. Distributed data processing system 100 may include anetwork of computers in which aspects of the illustrative embodimentsmay be implemented. The distributed data processing system 100 containsat least one storage area network (SAN) fabric 102, which is the mediumused to provide communication links between various devices andcomputers connected together within distributed data processing system100. The SAN fabric 102 may include connections, such as wire, wirelesscommunication links, fiber optic cables, switches, routers, etc.

In the depicted example, servers 104, 106, 108, 110, 112 and storagesystem 114 connect to SAN fabric 102. Servers 104, 106, 108, 110, 112write data to and read data from external storage systems, such asstorage system 114. External storage systems typically include cache toreduce latency. However, in many configurations, several servers mayaccess the same external storage, resulting in contention for resourcesand cache affinity going to other servers.

SAN fabric 102 may be any interconnection, such as Fibre Channel, FibreConnection (FICON), Serial Attached Small Computer Systems Interconnect(SAS), InfiniBand (IB), Fibre Channel over Convergence Enhanced Ethernet(FCOCEE), Internet Small Computer Systems Interconnect (iSCSI), etc.

FIG. 2 is a block diagram of an example data processing system in whichaspects of the illustrative embodiments may be implemented. Dataprocessing system 200 is an example of a computer, such as client 110 inFIG. 1, in which computer usable code or instructions implementing theprocesses for illustrative embodiments of the present invention may belocated.

In the depicted example, data processing system 200 employs a hubarchitecture including north bridge and memory controller hub (NB/MCH)202 and south bridge and input/output (I/O) controller hub (SB/ICH) 204.Processing unit 206, main memory 208, and graphics processor 210 areconnected to NB/MCH 202. Graphics processor 210 may be connected toNB/MCH 202 through an accelerated graphics port (AGP).

In the depicted example, local area network (LAN) adapter 212 connectsto SB/ICH 204. Audio adapter 216, keyboard and mouse adapter 220, modem222, read only memory (ROM) 224, hard disk drive (HDD) 226, CD-ROM drive230, universal serial bus (USB) ports and other communication ports 232,and PCI/PCIe devices 234 connect to SB/ICH 204 through bus 238 and bus240. PCI/PCIe devices may include, for example, Ethernet adapters,add-in cards, and PC cards for notebook computers. PCI uses a card buscontroller, while PCIe does not. ROM 224 may be, for example, a flashbasic input/output system (BIOS).

HDD 226 and CD-ROM drive 230 connect to SB/ICH 204 through bus 240. HDD226 and CD-ROM drive 230 may use, for example, an integrated driveelectronics (IDE) or serial advanced technology attachment (SATA)interface. Super I/O (SIO) device 236 may be connected to SB/ICH 204.

An operating system runs on processing unit 206. The operating systemcoordinates and provides control of various components within the dataprocessing system 200 in FIG. 2. As a client, the operating system maybe a commercially available operating system such as Microsoft Windows 7(Microsoft and Windows are trademarks of Microsoft Corporation in theUnited States, other countries, or both). An object-oriented programmingsystem, such as the Java programming system, may run in conjunction withthe operating system and provides calls to the operating system fromJava programs or applications executing on data processing system 200(Java is a trademark of Oracle and/or its affiliates.)

As a server, data processing system 200 may be, for example, an IBM®eServer™ System p® computer system, running the Advanced InteractiveExecutive (AIX®) operating system or the LINUX operating system (IBM,eServer, System p, and AIX are trademarks of International BusinessMachines Corporation in the United States, other countries, or both, andLINUX is a registered trademark of Linus Torvalds in the United States,other countries, or both). Data processing system 200 may be a symmetricmultiprocessor (SMP) system including a plurality of processors inprocessing unit 206. Alternatively, a single processor system may beemployed.

Instructions for the operating system, the object-oriented programmingsystem, and applications or programs are located on storage devices,such as HDD 226, and may be loaded into main memory 208 for execution byprocessing unit 206. The processes for illustrative embodiments of thepresent invention may be performed by processing unit 206 using computerusable program code, which may be located in a memory such as, forexample, main memory 208, ROM 224, or in one or more peripheral devices226 and 230, for example.

A bus system, such as bus 238 or bus 240 as shown in FIG. 2, may becomprised of one or more buses. Of course, the bus system may beimplemented using any type of communication fabric or architecture thatprovides for a transfer of data between different components or devicesattached to the fabric or architecture. A communication unit, such asmodem 222 or network adapter 212 of FIG. 2, may include one or moredevices used to transmit and receive data. A memory may be, for example,main memory 208, ROM 224, or a cache such as found in NB/MCH 202 in FIG.2.

Those of ordinary skill in the art will appreciate that the hardware inFIGS. 1 and 2 may vary depending on the implementation. Other internalhardware or peripheral devices, such as flash memory, equivalentnon-volatile memory, or optical disk drives and the like, may be used inaddition to or in place of the hardware depicted in FIGS. 1 and 2. Also,the processes of the illustrative embodiments may be applied to amultiprocessor data processing system, other than the SMP systemmentioned previously, without departing from the spirit and scope of thepresent invention.

Moreover, the data processing system 200 may take the form of any of anumber of different data processing systems including client computingdevices, server computing devices, a tablet computer, laptop computer,telephone or other communication device, a personal digital assistant(PDA), or the like. In some illustrative examples, data processingsystem 200 may be a portable computing device which is configured withflash memory to provide non-volatile memory for storing operating systemfiles and/or user-generated data, for example. Essentially, dataprocessing system 200 may be any known or later developed dataprocessing system without architectural limitation.

FIG. 3 is a diagram illustrating a storage area network with extendedcache in accordance with an illustrative embodiment. Servers 310, 320,330, 340 and storage system 360 connect to SAN fabric 350. Server 320connects to SAN fabric 350 via host bus adapter (HBA) 322. Server 340connects to SAN fabric 350 via HBA 342. Storage system 360 connects toSAN fabric 350 via HBA 364.

In accordance with the illustrative embodiment, server 310 may connectto SAN fabric 350 via HBA 312 or extended cache card (ECC) 314, andserver 330 may connect to SAN fabric 350 via HBA 332 or ECC 334. ECC 314and ECC 334 add cache to their servers in the form of dynamic randomaccess memory (DRAM) and non-volatile memory, such as flash memory orsolid state drives (SSDs) that are viewed as actual extensions ofexternal storage system 360. In this way, storage system 360 may bedistributed across the SAN into servers 310 and 330.

ECC 314, 334 may be a Peripheral Component Interconnect Express (PCIe)card. ECC 314, 334 may include non-volatile memory and a redundant arrayof independent disks (RAID) controller and a SAN interface, whichlogically become part of the storage system by keeping caches coherentto the external storage system 360. When server 310, for example,performs a read, server 310 keeps a directory bit map, ECC map 318,which keeps a record of which servers having extended cache cards havefetched particular logical block address (LBA) ranges. Similarly, server330 has ECC map 338 to record which servers having extended cache cardshave fetched particular LBA ranges. ECC maps 318, 338 also record whichLBAs are updated by servers. Alternatively, ECC maps 318, 338 may beseparated into separated maps for reads and writes.

When a server updates a LBA range, servers 310, 330 search ECC maps 318,338 to determine whether the data is present in ECC 314 or ECC 334. If aserver finds a record for the data in ECC 314, 334, the server issues aServer Invalidate semantic to inform the ECC 314, 334 that they areholding stale data. ECCs 314, 334 are then responsible for invalidatingthe cache entry in its non-volatile memory and/or DRAM and must go tostorage system 360 to update the data.

In one example embodiment, when a server with an ECC, such as server 310or server 330 in FIG. 3, does a write, the ECC updates its directories,places the data in its cache, and writes the data to external storagesystem 360. Thus, external storage system 360 always has the mostup-to-date copy of the data.

To speed up latency of writes, if the ECC 318, 338 has a method ofholding up during a power outage, the external storage system 360 onlyhas to have one copy of the write data. If there is a hardware orsoftware failure with the copy of the data in the external storagesystem 360, then storage system 360 issues a command to the ECC with theupdated data telling it to send a copy to the external storage system360.

When write data ages out of the ECC 314, 334 and has not been updated byany other server, then the ECC notifies the external storage system 360that it needs another copy of the data. In one example embodiment, theECC 314, 334 does a normal write without indicating that it has kept acopy. The storage system 360 accepts the write and makes a copy. Whenthe storage system 360 completes the write successfully, the ECC 314,334 may discard its copy of the data.

In another illustrative embodiment, the external cache cards 314, 334may come in pairs and perform writes that are write-back to the externalstorage system 360. The external storage system 360 must keep the cachescoherent and issue flushes when necessary. When a server 310, 330 does awrite to its extended cache card, the ECC 314, 334 saves the contentsand writes a Touch semantic to the storage system 360. The Touchsemantic does not include any data, but indicates the LBAs that areupdated.

When the storage system 360 receives the Touch semantic, storage system360 invalidates any copy of the LBAs it has in its cache and sendsInvalidate semantics to all ECC cards in any server that may haveupdated the LBAs. Thus, storage system 360 may keep an ECC map 362 torecord which LBAs are updated or read by which servers.

When and if time permits, the ECC card 314, 334 may send a copy of thedata to the external storage system 360 but indicate in the writecommand that it is a copy of the updated data. The ECC map 318, 338, 368may not be changed as to the owner. In this way, any reads to this LBArange can be serviced by the external storage system 360 without goingto the ECC. If a server, such as server 310, does a read without it yetbeing copied to the ECC 314, the external storage system 360 issues aSend Copy command telling the controlling ECC, such as ECC 334, that ithas the most up-to-date copy of the data but to write a copy to externalstorage system 360. The external storage system 360 may then service theread.

If another server, such as server 340, writes to the external storageserver 360, any of the data within the LBA range, external storageserver 360 issues either an Invalidate command or a Flush and Invalidatecommand to the ECC that had the data, such as ECC 334. Flush requiresthe controlling ECC to write the data to storage system 360. This may bedone if another device had written on a granularity less than what theexternal storage system uses as a minimum size, i.e., a page or track orthe like. Storage system 360 may then merge the data.

If another ECC, such as ECC 314, sends a Touch command and the externalstorage system determines that some or all of the LBA range is beingcontrolled by another ECC, such as ECC 334, then it issues Invalidatesemantics to ECC 334 for the LBAs updated by ECC 314.

The devices in the SAN shown in FIG. 3 may issue the semantics andcommands using custom commands, custom bits in the cache descriptorblock (CDB), or messages using writes to certain memory regions.

FIG. 4 is a block diagram illustrating an extended cache card inaccordance with an illustrative embodiment. Extended cache card (ECC)400 has a system bus 404 connected to a host side interface 402 and astorage side interface 406. Redundant array of independent disks (RAID)controller 412, dynamic random access memory (DRAM) 414, protocolcircuits 416, and non-volatile memory 418 connect to system bus 404.RAID controller 412 may receive reads and writes from the server throughhost side interface 402 and perform reads from DRAM 414, non-volatilememory 418, a pair ECC, and/or the external storage system. In fact,RAID controller 412 could potentially read from or write to any ECC inthe SAN. When ECC 400 reads or writes data, the data may be cached inDRAM 414 or non-volatile memory 418. RAID controller 412 may read datafrom or write data to an external storage system via storage sideinterface 406.

Protocol circuits 416 may allow ECC 400 to communicate via the SANfabric using Fibre Channel, Fibre Connection (FICON), Serial AttachedSmall Computer Systems Interconnect (SAS), InfiniBand (IB), FibreChannel over Convergence Enhanced Ethernet (FCOCEE), or Internet SmallComputer Systems Interconnect (iSCSI) protocols, for instance.

As will be appreciated by one skilled in the art, the present inventionmay be embodied as a system, method, or computer program product.Accordingly, aspects of the present invention may take the form of anentirely hardware embodiment, an entirely software embodiment (includingfirmware, resident software, micro-code, etc.) or an embodimentcombining software and hardware aspects that may all generally bereferred to herein as a “circuit,” “module” or “system.” Furthermore,aspects of the present invention may take the form of a computer programproduct embodied in any one or more computer readable medium(s) havingcomputer usable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CDROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, in abaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Computer code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, radio frequency (RF), etc., or anysuitable combination thereof.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java™, Smalltalk™, C++, or the like, and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer, or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described below with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to the illustrativeembodiments of the invention. It will be understood that each block ofthe flowchart illustrations and/or block diagrams, and combinations ofblocks in the flowchart illustrations and/or block diagrams, can beimplemented by computer program instructions. These computer programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which execute via the processor of the computer or other programmabledata processing apparatus, create means for implementing thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions thatimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus, or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified function(s). It should also be noted that, insome alternative implementations, the functions noted in the block mayoccur out of the order noted in the figures. For example, two blocksshown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

FIG. 5 is a flowchart illustrating operation of a server with extendedcache for an external storage system with writethrough in accordancewith an illustrative embodiment. Operation begins, and the serverdetermines whether it is to perform a read (block 502). If the serverperforms a read, the server reads data (block 504) and notifies otherservers of the address range (block 506). Thereafter, operation returnsto block 502 to determine whether the server is to perform a read. Theserver may perform the read by sending a read command to an extendedcache card, which either returns the data from its cache or reads thedata from external storage. The server may notify other servers that ithas an up-to-date copy of the data so other servers know to send anInvalidate semantic to the server's extended cache card (ECC) whenupdating the data.

If the server does not perform a read in block 502, the serverdetermines whether it is to perform a write (block 508). If the serverperforms a write, the server writes the data (block 510), searches theextended cache card (ECC) map to identify whether any ECCs have a copyof the data (block 512), and sends an Invalidate semantic to any ECCsthat have the data, if any (block 514). Thereafter, operation returns toblock 502 to determine whether the server is to perform a read.

If the server does not perform a write in block 508, then the serverdetermines whether it receives an Invalidate semantic (block 516). Ifthe server receives an Invalidate semantic, then the server marks thedata as invalid in the ECC map (block 518). Thereafter, or if the serverdoes not receive an Invalidate semantic in block 516, operation returnsto block 502 to determine whether the server is to perform a read.

FIG. 6 is a flowchart illustrating operation of an extended cache cardfor extending cache for an external storage system with writethrough inaccordance with an illustrative embodiment. Operation begins, and theextended cache card (ECC) determines whether it receives a read commandfrom its server (block 602). If the ECC receives a read command, the ECCdetermines whether the data is in cache in the ECC (block 604). If thedata is in cache, the ECC reads data from the cache (block 606) andreturns the read data to the server (block 608), and operation returnsto block 602 to determine whether the ECC receives a read command fromits server.

If the data is not in cache in the ECC in block 604, then the ECC readsdata from the external storage (block 610), stores data in cache (block612), and returns the read data to the server (block 608). Thereafter,operation returns to block 602 to determine whether the ECC receives aread command from its server.

If the ECC does not receive a read command in block 602, the ECCdetermines whether it receives a write command from its server (block614). If the ECC receives a write command, the ECC updates itsdirectories (block 616), stores the data in its cache (block 618), andwrites the data to the storage system (block 620). Thereafter, operationreturns to block 602 to determine whether the ECC receives a readcommand from its server.

If the ECC does not receive a write command from its server in block614, the ECC determines whether to update data to the storage system(block 622). The ECC may update data to the storage system if the dataages out of the ECC cache and has not been updated by any other server,for example. If the ECC determines that it is to update data at thestorage system, the ECC sends a copy of the data to the external storagesystem (block 624) and discards its copy of the data (block 626).Thereafter, operation returns to block 602 to determine whether the ECCreceives a read command from its server.

If the ECC does not update data in block 622, the ECC determines whetherit receives an Invalidate semantic (block 628). If the ECC receives anInvalidate semantic, the ECC updates its directory to invalidate thedata (block 630). Thereafter, or if the ECC does not receive anInvalidate semantic, operation returns to block 602 to determine whetherthe ECC receives a read command from its server.

FIG. 7 is a flowchart illustrating operation of an extended cache cardfor extending cache for an external storage system with writeback inaccordance with an illustrative embodiment. Operation begins, and theextended cache card (ECC) determines whether it receives a read commandfrom its server (block 702). If the ECC receives a read command, the ECCdetermines whether the data is in cache in the ECC (block 704). If thedata is in cache, the ECC reads data from the cache (block 706) andreturns the read data to the server (block 708), and operation returnsto block 702 to determine whether the ECC receives a read command fromits server.

If the data is not in cache in the ECC in block 704, then the ECC readsdata from the external storage (block 710), stores data in cache (block712), and returns the read data to the server (block 708). Thereafter,operation returns to block 702 to determine whether the ECC receives aread command from its server.

If the ECC does not receive a read command in block 702, the ECCdetermines whether it receives a write command from its server (block716). If the ECC receives a write command, the ECC updates itsdirectories (block 718), stores the data in its cache (block 720), sendsa Touch semantic to the storage system (block 722), and sends a copy ofthe data to its partner ECC (block 724). Thereafter, operation returnsto block 702 to determine whether the ECC receives a read command fromits server.

If the ECC does not receive a write command from its server in block716, the ECC determines whether to update data to the storage system(block 726). The ECC may update data to the storage system if thestorage system sends an update request to the ECC so the storage systemcan service a read request from another server, for example. If the ECCdetermines that it is to update data at the storage system, the ECCsends a copy of the data to the external storage system (block 728).Thereafter, operation returns to block 702 to determine whether the ECCreceives a read command from its server.

If the ECC does not update data in block 726, the ECC determines whetherit receives an Invalidate semantic (block 730). If the ECC receives anInvalidate semantic, the ECC updates its directory to invalidate thedata (block 732). Thereafter, or if the ECC does not receive anInvalidate semantic, operation returns to block 702 to determine whetherthe ECC receives a read command from its server.

FIG. 8 is a flowchart illustrating operation of a storage system withextended cache card with writeback in accordance with an illustrativeembodiment. Operation begins, and the storage system determines whetherit receives a read request from an ECC (block 802). If the storagesystem determines that it receives a read request, the storage systemdetermines whether it is to update its copy of the data (block 804). Ifthe storage system determines that it has an up-to-date copy of the datain block 804, the storage system sends the data to the ECC (block 806),stores the data in the cache in the storage system (block 808), andupdates an ECC map in the storage system to indicate that the ECC hasread a copy of the data (block 810). Thereafter, operation returns toblock 802 to determine whether the storage system receives a readrequest from an ECC.

If the storage system determines that the storage system is to updateits copy of the data in block 804, the storage system sends an updaterequest to the ECC with the most up-to-date copy of the data (block 812)and receives updated data from the ECC (block 814). Then, the storagesystem sends the data to the ECC (block 806), stores the data in thecache in the storage system (block 808), and updates ECC map in thestorage system to indicate that the ECC has read a copy of the data(block 810). Thereafter, operation returns to block 802 to determinewhether the storage system receives a read request from an ECC.

If the storage system does not receive a read request in block 802, thestorage system determines whether it receives a Touch semantic from anECC (block 816). If the storage system receives a Touch semantic, thestorage system invalidates its copy of the data in its cache and on disk(block 818), sends an Invalidate semantic to the ECC cards having a copyof the data (block 820), and updates its ECC map to indicate which ECCshave up-to-date copies of the data (block 822). At this point, only theECC sending the touch semantic and its partner ECC have the valid data.Thereafter, or if the storage system does not receive a write request inblock 816, operation returns to block 802 to determine whether thestorage system receives a read request from an ECC.

Thus, the illustrative embodiments provide mechanisms for extendingcache for an external storage system into individual servers. Certainservers may have cards with cache in the form of dynamic random accessmemory (DRAM) and non-volatile storage, such as flash memory orsolid-state drives (SSDs), which may be viewed as actual extensions ofthe external storage system. In this way, the storage system isdistributed across the storage area network (SAN) into various servers.Several new semantics are used in communication between the cards andthe storage system to keep the read caches coherent.

As noted above, it should be appreciated that the illustrativeembodiments may take the form of an entirety hardware embodiment, anentirely software embodiment or an embodiment containing both hardwareand software elements. In one example embodiment, the mechanisms of theillustrative embodiments are implemented in software or program code,which includes but is not limited to firmware, resident software,microcode, etc.

A data processing system suitable for storing and/or executing programcode will include at least one processor coupled directly or indirectlyto memory elements through a system bus. The memory elements can includelocal memory employed during actual execution of the program code, bulkstorage, and cache memories which provide temporary storage of at leastsome program code in order to reduce the number of times code must beretrieved from bulk storage during execution.

Input/output or I/O devices (including but not limited to keyboards,displays, pointing devices, etc.) can be coupled to the system eitherdirectly or through intervening I/O controllers. Network adapters mayalso be coupled to the system to enable the data processing system tobecome coupled to other data processing systems or remote printers orstorage devices through intervening private or public networks. Modems,cable modems and Ethernet cards are just a few of the currentlyavailable types of network adapters.

The description of the present invention has been presented for purposesof illustration and description, and is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the art. Theembodiment was chosen and described in order to best explain theprinciples of the invention, the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

1. A method, in a data processing system, for extending cache for astorage system in a storage area network, the method comprising: storinga copy of data in an extended cache card attached to a server, whereinthe extended cache card comprises a non-volatile memory for storingcopies of data read from or written to an external storage system by theserver; responsive to receiving from the server a request to read afirst portion of data from the external storage system, determiningwhether the extended cache card stores an up-to-date copy of the firstportion of data; and responsive to a determination that the extendedcache card stores an up-to-date copy of the first portion of data,sending the copy of the first portion of data from the extended cachecard to the server.
 2. The method of claim 1, further comprising:responsive to a determination that the extended cache card does notstore an up-to-date copy of the first portion of data, reading the firstportion of data from the external storage system, storing a copy of thefirst portion of data in the non-volatile memory of the extended cachecard, and sending the first portion of data from the extended cache cardto the server.
 3. The method of claim 1, further comprising: responsiveto receiving from the server a request to write a second portion of datato the external storage system, storing the second portion of data inthe non-volatile memory of the extended cache card and writing, by theextended cache card, the second portion of data to the external storagesystem.
 4. The method of claim 3, further comprising: sending anInvalidate semantic to other external cache cards that store a copy ofthe second portion of data.
 5. The method of claim 1, furthercomprising: responsive to a third portion of data aging out of cache inthe extended cache card and the third portion of data not being updatedby another server, sending a copy of the third portion of data from theextended cache card to the external storage system and discarding thethird portion of data from the extended cache card.
 6. The method ofclaim 1, further comprising: responsive to receiving from the server arequest to write a fourth portion of data to the external storagesystem, storing the fourth portion of data in the non-volatile memory ofthe extended cache card and sending a Touch semantic from the extendedcache card to the external storage system, wherein the Touch semanticindicates that the fourth portion of data has been updated.
 7. Themethod of claim 6, further comprising: sending a copy of the fourthportion of data to a partner extended cache card.
 8. The method of claim7, wherein the partner extended cache card is attached to another serverin the storage area network.
 9. The method of claim 1, furthercomprising: receiving an Invalidate semantic from another server,wherein the Invalidate semantic indicates that a fifth portion of datais updated by the another server; and updating a directory in theextended cache card to invalidate the fifth portion of data in theextended cache card.
 10. The method of claim 1, further comprising:receiving from the external storage system a request for an updated copyof a sixth portion of data; and sending a copy of the sixth portion ofdata from the extended cache card to the external storage system. 11-24.(canceled)